《Cursor文档》-Review and triage templates

Each template is one model turn. A review template reads the diff and posts one comment, and the triage template comments on a ticket you already filed.

阅读全文
《Cursor文档》-Review pull requests with owners policies

This agent risk tiers every pull request in your repository, requests the owners as reviewers, and approves what your policy allows. Rules live in .agentic owners/policy.yml files at any depth. The closest policy to a changed file wins. The agent reads policies from the PR's base ref, so a PR can't exempt itself.

阅读全文
《Cursor文档》-Tools

A tool is a typed action the model can call, such as hitting an API, running a query, or writing a file. Each file in bot/tools/ defines one tool, and the filename is the name the model sees. Server tools run on the serving host, and agent tools run as scripts next to the agent.

阅读全文
《Cursor文档》-Subagents

A subagent is a specialist child agent the model can delegate to mid turn. Each one lives under bot/subagents/<id / with a required agent.ts.

阅读全文
《Cursor文档》-Skills

A skill is an on demand procedure in the SKILL.md convention. Agent SDK advertises each skill by its description, and the model loads a skill only when the task calls for it. Skills give an agent a multi step workflow without carrying it in the always on instructions.

阅读全文
《Cursor文档》-Sessions, events, and streaming

A session keeps one conversation, its workspace, and an append only record of every message and tool call.

阅读全文
《Cursor文档》-Schedules and reminders

A schedule or a reminder lets an agent act without an inbound message.

阅读全文
《Cursor文档》-Project layout

An Agent SDK project keeps agent files under bot/, and each file's path determines how Agent SDK loads it. Evals live in evals/ at the project root, beside bot/.

阅读全文
《Cursor文档》-Playground

agent sdk serve hosts a web playground at http://127.0.0.1:3000/playground. When one server hosts multiple agents, each agent's playground is at /<slug /playground and / lists them.

阅读全文
《Cursor文档》-Memory

A memory hook appends one record per turn to a journal. The model reads the journal with its file tools when its instructions send it there.

阅读全文
《Cursor文档》-Limits

Cursor caps deployments for every team. These are the default values.

阅读全文
《Cursor文档》-Instructions

Instructions are the always on prompt for every turn. A root agent requires them, and a subagent may inline instructions in agent.ts instead.

阅读全文
《Cursor文档》-HTTP API

In the default multi agent layout each agent serves its routes at /<slug /v1/ , and mode single serves them at /v1/ .

阅读全文
《Cursor文档》-Hooks

A hook subscribes to selected session events and can run a side effect after each matching event is recorded. Hooks run in the serving process for every session of the agent. They cannot change the turn, the prompt, or the reply. A handler that throws is logged and skipped.

阅读全文
《Cursor文档》-Extensions

An extension packages capabilities that would otherwise live under bot/, such as tools, skills, and connections. One mount file adds them under a namespace without copying their source into your project.

阅读全文
《Cursor文档》-Evals

Evals run fixed cases against an agent and record whether its turns, tools, events, and output meet a contract. The Evals guide covers the regression workflow.

阅读全文
《Cursor文档》-MCP connections

An MCP connection gives the agent tools from an MCP server. Each file under bot/mcp connections/ default exports defineConnection from @grok/agent sdk/connections, and its filename becomes the server name. A connection reaches a remote HTTP server, a local stdio process, the signed in Cursor account's connectors, or a peer agent by slug.

阅读全文
《Cursor文档》-Agent SDK CLI

The CLI needs Node 22.13 or newer. Run agent sdk <command help to see every flag for that command.

阅读全文
《Cursor文档》-Channels

A channel connects an external surface to agent sessions. A file at bot/channels/<id .ts defines channel <id and mounts its routes under /v1/channels/<id , and the built in HTTP channel serves the HTTP API routes and is always available.

阅读全文
《Cursor文档》-Artifacts

Artifacts are durable outputs such as reviewed pull requests or reports. Records persist across sessions, update by key, and can be listed, streamed, or downloaded.

阅读全文
《Cursor文档》-Agent config

bot/agent.ts default exports defineAgent(config), which sets the model that runs the agent and the defaults for a local run. Every field is optional on the root agent.

阅读全文
《Cursor文档》-Access

Deployed Agents calls the three access levels Viewer, Editor, and Owner, and the API calls them viewer, deployer, and admin. admin is Owner, and a write also accepts owner for that role and editor for Editor.

阅读全文
《Cursor文档》-Build a PR reviewer with Agent SDK

You'll build a reviewer that rates each pull request as trivial, moderate, or large, then approves safe changes or asks for a human review.

阅读全文
《Cursor文档》-Hillclimbing

Hillclimbing improves an agent one measured change at a time. Hold the inputs fixed, change one thing, and keep it only when the same run gets better without moving the behavior you froze.

阅读全文
《Cursor文档》-Authenticate deployed agents with OIDC

A deployed Agent SDK agent can mint short lived OIDC JWTs signed by Cursor and exchange them for temporary cloud credentials or service tokens without storing static access keys in deployment secrets.

阅读全文
《Cursor文档》-Webhook agents

A custom channel turns an event from another system into an agent conversation and sends the result back to the system that started it. Use one when the built in HTTP API doesn't match the provider's payload, conversation key, or reply path.

阅读全文
《Cursor文档》-Microsoft Teams agents

A Teams agent wakes when someone @mentions it in a channel or group chat, messages it in a personal chat, or posts in a channel it watches. It answers in the same reply chain. teamsChannel() takes the same engagement options as slackChannel(), so an agent that already runs in Slack can run in Teams with the same shape of config.

阅读全文
《Cursor文档》-Slack Agents

Agent SDK makes it easy to build agents that work in Slack.

阅读全文
《Cursor文档》-Run MCP connectors as the signed-in user

On Cursor hosting, a cursorAccount: true MCP connection defaults to credentials: "shared". Every turn calls the MCP server through the deployment's service account.

阅读全文
《Cursor文档》-PagerDuty agents

A PagerDuty agent wakes when an incident triggers, investigates it, and writes what it found back to the incident. pagerdutyChannel() verifies PagerDuty's v3 webhooks and sends every later event for that incident to the session that started the investigation.

阅读全文
《Cursor文档》-OpenTelemetry

Agent SDK sends traces, metrics, and logs to an OTLP collector when you set the OTEL variables. Record your own with @opentelemetry/api.

阅读全文
《Cursor文档》-Migrate an early-alpha project to architecture v2

Use this guide only for an Agent SDK project deployed on architecture v1 during the early alpha. Every other project already runs on v2.

阅读全文
《Cursor文档》-Connect a private MCP server with OAuth

Host MCP OAuth lets the machine running your agent authorize a remote MCP server without putting tokens in your source or workspace.

阅读全文
《Cursor文档》-Use Jev in review tools

\[!WARNING] Experimental. @grok/agent sdk/extensions/jev is experimental. Its exports and behavior can change in any release, without a deprecation period.

阅读全文
《Cursor文档》-Self-improvement

The improve extension lets an agent turn "change how you work" into a change to its own source. The agent writes a brief, a Cursor cloud agent edits a checkout and opens a pull request, and the agent reports the pull request.

阅读全文
《Cursor文档》-GitLab agents

A GitLab agent wakes on merge request, note, and pipeline events from GitLab.com or a self managed server, then writes its results back to the project. Declare onMergeRequest, onNote, or onPipeline on gitlabChannel() for each event that should wake it.

阅读全文
《Cursor文档》-GitHub agents

A GitHub agent wakes from repo events, reads the latest PR and CI state, then writes back reviews, comments, checks, or pushes. Every wake for the same pull request resumes one session, so the open, later comments, and CI results share one conversation.

阅读全文
《Cursor文档》-Convert a Cursor Automation

Convert a dashboard Automation when you want to edit its behavior as code, test it locally, or deploy it as an Agent SDK project. To change only the prompt or the trigger, stay in the dashboard.

阅读全文
《Cursor文档》-Cloud agents

The cursor cloud agents extension lets an Agent SDK agent hand coding work to Cursor cloud agents. A cloud agent works in a repository checkout and pushes branches and pull requests while your agent keeps talking to the person.

阅读全文
《Cursor文档》-Bitbucket agents

A Bitbucket agent wakes on pull request, comment, and push events from Bitbucket Cloud or Data Center, then writes its results back to the repository. Declare onPullRequest, onPullRequestComment, or onPush on bitbucketChannel() for each event that should wake it.

阅读全文
《Cursor文档》-Peer agents

A peer connection lets one agent ask an independent specialist for help. The specialist keeps its own instructions, tools, and sessions. On Cursor hosting, team owned agents reach each other by deployment slug, and Agent SDK handles routing and authentication for you.

阅读全文
《Cursor文档》-Evals

An eval sends a fixed input to the real agent and checks which tools ran and what the answer looks like. To improve an agent and lock each win with an eval, follow Hillclimbing.

阅读全文
《Cursor文档》-Deploy an Agent SDK project

Deploy a pushed Git ref as a stable service on Cursor managed hosting, or self host it when you need your own network or process controls.

阅读全文
《Cursor文档》-Build with a coding agent

A coding agent in your checkout can create an Agent SDK project, call its tools, run a real turn, and check the result from the CLI. You approve the plan and any side effects.

阅读全文
《Cursor文档》-Agent SDK

Agent SDK lets you define, test, evaluate, and deploy agents as code. It uses the Cursor SDK harness that powers Bugbot, Security Review, Approval Bot, and Rollouts.

阅读全文
dsh-claude-code-sdk:把 DSH 任务委派给本机 Claude Code

通过官方 Claude Agent SDK,把自包含的编码任务委派给本机 Claude Code 执行,结果回传给 DSH。DSH 当 leader,Claude Code 当 worker。插件把当前 DSH 对话历史注入到任务上下文,worker 实际调用过的工具不会进入外层 DSH 会话的上下文。

阅读全文
dsh-claude-bridge:通过 Agent SDK 驱动 Claude Code CLI

`dsh-claude-bridge` 是 DeepSeek Harness 的插件,旨在通过运行 Claude Code CLI,将 Claude Pro 或 Max 订阅额度计入 DSH 计费,避免使用 OAuth 流程。它支持流式输出、工具调用及 1M token 上下文窗口等核心功能。安装需指定 `--profile web`,配置文件需指定路径。插件通过读取 Claude Code CLI 凭证文件运行,并接管部分环境变量以防止计费错误。该插件由 shaneconner 维护,基于 MIT 许可证开源。

阅读全文